<template>
	<view class="content">
		<view class="box">
			<view class="box-con">
				<view class="box-con-c">
					<view class="box-con-c-item" @click="goNav(item.url)" v-for="(item,index) in typeList" :key="index">
						<view class="">
							<image :src="item.imageUrl" mode=""></image>
						</view>
						
						<view class="">
							{{item.name}}
						</view>
					</view>
				</view>
				<!-- <view class="box-con-text">
					期待更多服务
				</view> -->
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				typeList:[],
			};
		},
		onLoad() {
			this.getGrid();
		},
		methods:{
			// 跳转
			goNav(url) {
				console.log(url, '1111112333')
				if (url.indexOf('/pages/') !== -1) {
					uni.navigateTo({
						url
					});
				} else {
					//#ifndef H5
					uni.navigateTo({
						url: '/pages/index/webView?url=' + url
					});
					//#endif
					//#ifdef H5
					window.location.href = url;
					//#endif
				}
			},
			// 获取金刚区分类
			getGrid() {
				let _this = this
				this.$Request.get("/app/banner/selectBannerList", {
					classify: 2
				}).then(res => {
					if (res.code == 0) {
						console.log(res.data,'111111111111111')
						_this.typeList = res.data
						// console.log(this.gridData, '；；；；；；')
					}
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
.content{
	width: 100%;
	height: calc(100vh - 88rpx);
	background-color: #F7F7F7;
}
.box{
	width: 100%;
	display: flex;
	justify-content: center;
	.box-con{
		margin-top: 20rpx;
		width: 686rpx;
		height: 100%;
		background-color: #ffffff;
		border-radius: 24rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		padding-top: 30rpx;
		padding-bottom: 30rpx;
		flex-wrap: wrap;
		.box-con-text{
			font-size: 24rpx;
			color: #999999;
		}
		.box-con-c{
			// width: calc(686rpx - 88rpx);
			width: 100%;
			height: 100%;
			display: flex;
			justify-content: space-between;
			flex-wrap: wrap;
			
		}
		.box-con-c-item:nth-of-type(1){
			margin-top: 0;
		}
		.box-con-c-item:nth-of-type(2){
			margin-top: 0;
		}
		.box-con-c-item:nth-of-type(3){
			margin-top: 0;
		}
		.box-con-c-item{
			width: 199rpx;
			margin-top: 30rpx;
			// display: flex;
			// justify-content: center;
			// align-items: center;
			// flex-wrap: wrap;
			view{
				width: 100%;
				display: flex;
				justify-content: center;
			}
			// view:nth-of-type(2){
			// 	margin-top: 20rpx;
			// }
			font-size: 24rpx;
			
			image{
				width: 120rpx;
				height: 120rpx;
			}
		}
	}
}
</style>
